package cn.xd.itstack.springframework.beans.factory.config;

import cn.xd.itstack.springframework.beans.BeansException;
import cn.xd.itstack.springframework.beans.PropertyValues;

/**
 * @Classname InstantiationAwareBeanPostProcessor
 * @Description TODO
 * @Date 2022/6/6 下午5:55
 * @Created by lvxiaodong
 */
public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {


    /**
     * 对象实例化之前判断对象是否需要代理
     * @param clazz
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object postProcessBeforeInstantiation(Class<?> clazz,String beanName) throws BeansException;


    /**
     * 注入属性之前的一些操作
     * @param propertyValues
     * @param bean
     * @param beanName
     * @return
     */
    PropertyValues postProcessPropertyValues(PropertyValues propertyValues,Object bean,String beanName);


}
